The archive bit is a file attribute used by CP/M, Microsoft operating systems, OS/2, and AmigaOS. It is used to indicate whether or not the file has been Backup (archived).
Backup software may provide the option to do a full backup while clearing archive bits – that is, to back up all files regardless of their archive bit status, and to clear the archive bit for all files processed by the backup. This allows for the creation of an initial full backup that will be supplemented by incremental backups in the future. Later, the incremental backup task uses the archive bit to distinguish which files have already been backed up, and selects only the new or modified files for backup.
The operating system never clears the archive bit unless explicitly told to do so by the user. Even when a user explicitly tells the operating system to copy a file for the purpose of archiving it, the archive bit will still not be cleared. A specific command for clearing or setting the bit must be executed. On the other hand, whenever a file with a clear archive bit is modified (edited), or copied or moved to a new location, the operating system will set the archive bit on the target file. Typically on a file system that has never been formally backed up, nearly all of the files will have their archive bits set, as there are few applications that make use of archive bits without the user's request.
In MS-DOS as well as nearly all versions of Windows, status of the archive bit can be viewed or changed with the attrib command-line utility, or by viewing the properties of a file with the Windows shell or Windows Explorer. The archive bit's status can also be viewed or changed with the GetFileAttributes, GetFileAttributesEx, and SetFileAttributes Windows APIs. The archive bit can be set or cleared with the attributes property in VBScript or JScript.
The archive bit is a file attribute and not part of the file itself, so the contents of the file remain unchanged when the status of the archive bit changes.
|
|